<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./js/vue.js"></script>
</head>

<body>
    <div id="app">
	<div>{{name|upper|lower}}</div>
	</div>

	
    <script>
		<!-- Vue.filter('upper',function(val){ -->
		<!-- return val.charAt(0).toUpperCase()+val.slice(1); -->
		<!-- }) -->
		Vue.filter('lower',function(val){
		return val.charAt(0).toLowerCase()+val.slice(1);
		})
        var vm = new Vue({
            el: '#app',
            data: {
				name:'tom'
            },methods: {
				
			},filters:{
				upper:function(val){
					return val.charAt(0).toUpperCase()+val.slice(1);
				}
			}
        })
    </script>
</body>

</html>